//
//  CoreDataManager.h
//  XMPP
//
//  Created by 纪洪波 on 15/11/21.
//  Copyright © 2015年 纪洪波. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "UserModel.h"
#import "VideoModel.h"


@interface CoreDataManager : NSObject
//  单例
+ (CoreDataManager *)shareInstance;
//  初始化数据库
- (void)initCoreData;
//  注册新用户
- (void) addNewUserWithUserModel:(UserModel *)model;
//  查询用户名
- (BOOL) checkUsername:(NSString *)username;
//  查询密码
- (BOOL)checkPassword:(NSString *)password withUsername:(NSString *)username;
//  插入数据
- (void)insertDataWithModel:(VideoModel *)inModel;
//  读取数据
- (BOOL)selectDataWithID:(NSInteger)id;
//  删除记录
- (void)deleteDataWithID:(NSInteger)id;
@end
